<script>
import HeaderTitle from "../../components/shiqinComponents/pageComponents/headerTitle.vue";
import ImageAvater from "../../components/shiqinComponents/pageComponents/imageAvater.vue";
import {getUserInfo} from "../../api/user";

export default {
  name: "index",
  components: {ImageAvater, HeaderTitle},
  onLoad() {
    setTimeout(()=>{
      if(!this.$store.getters.isLogin){
        this.$nav.reLaunch('/pages/users/wechat_login/index')
      }else{
        getUserInfo().then(res=>{
          if(res.data.is_bind == 0){
            this.$nav.reLaunch('/pages/loginType/selectGender')
          }else{
            uni.switchTab({
              url: '/pages/family/index'
            })
          }
        })
      }
    },1500)
  },
}
</script>

<template>
  <view class="shiqinLogin">
    <view class="bag">
      <image class="bag_image" src="@/static/shiqin-images/01.png" mode="widthFix"></image>
    </view>
<!--    <header-title title="拾亲登录"></header-title>-->
    <view class="shiqinLogin_content allColumnCenter">
      <image-avater :width="198" :height="198" src="/static/shiqin-images/shiqin_logo_color.png"></image-avater>
      <text class="shiqinLogin_content_text mt-8">拾亲</text>
    </view>
  </view>
</template>

<style scoped lang="scss">
.shiqinLogin {
  width: 750rpx;
  min-height: 100vh;
  overflow: hidden;
  background: #F5F5F5;
  border-radius: 0rpx 0rpx 0rpx 0rpx;

  .bag {
    width: 750rpx;
    position: absolute;
    top: 0;
    left: 0;

    .bag_image {
      width: 750rpx;
    }
  }

  .shiqinLogin_content {
    margin-top: 446rpx;
    width: 750rpx;
    z-index: 1;

    .shiqinLogin_content_text {
      font-family: PingFang SC, PingFang SC;
      font-weight: 500;
      font-size: 38rpx;
      color: #4B4B4B;
    }
  }
}
</style>